package com.huaxin.hxmoduleworkorder.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.huaxin.hxmoduleworkorder.common.enums.InspectionReadStatus;
import com.huaxin.hxmoduleworkorder.common.enums.InspectionSendStatus;
import com.huaxin.hxmoduleworkorder.dto.ResponseResult;
import com.huaxin.hxmoduleworkorder.dto.request.GetOrderNotificationInSystemByUserIdReqDTO;
import com.huaxin.hxmoduleworkorder.dto.request.OrderNotificationCreateReqDTO;
import com.huaxin.hxmoduleworkorder.models.OrderNotification;

public interface OrderNotificationService extends IService<OrderNotification> {
    /**
     * 创建工单通知
     *
     * @param in
     * @return
     */
    boolean create(OrderNotificationCreateReqDTO in);

    /**
     * 查询工单通知列表
     *
     * @param in
     * @return
     */
    ResponseResult<Page<OrderNotification>> getOrderNotificationInSystemByUserId(GetOrderNotificationInSystemByUserIdReqDTO in);

    /**
     * 获取工单通知详情
     *
     * @param id
     * @return
     */
    ResponseResult<OrderNotification> getOrderNotificationById(String id);

    /**
     * 更新工单通知发送状态
     *
     * @param id
     * @param sendStatus
     * @return
     */
    boolean updateOrderNotificationSendStatus(String id, InspectionSendStatus sendStatus);

    /**
     * 获取工单通知详情
     *
     * @param id
     * @return
     */
    boolean updateOrderNotificationReadStatus(String id, InspectionReadStatus readStatus);

}
